/*----------------------------------------------------------------------------------------
*
*  Copyright 2019, Gao Hai Hui, <fromzeropoint@126.com>.  All rights reserved.
*  https://gitee.com/helloworldghh/xoskit.git
*  Use of this source code is governed by a MIT license
*  that can be found in the License file.
*
----------------------------------------------------------------------------------------*/
#ifndef __DATA_STRUCT_MODULE_H__
#define __DATA_STRUCT_MODULE_H__

#include "../tools/head.h"

namespace xos_cat
{

    class module : public xos_stl::mem_item< xos::release_impl<module>, thread_lock >
    {
    public:
        typedef xos::release_impl<module> T;

    public:
        ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        // 
        static int get_xos_item_data( ITEM_DATA*& item_ptr );

    public:
        module();
        ~module();

    public:
        xos_box::i_notify* m_pNotify;

        net::i_module* m_pModule;
        xos::i_dynamic* m_pDll;

        std::string m_full_file;
        std::string m_name;

    protected:
        int init_data();
        
    public:
        int init();
        int term();
        
    };

} // xos_cat

#endif // __DATA_STRUCT_MODULE_H__
